var should = require('should');
var moment = require('moment');
var _ = require('lodash');
var genRewardService = require('../../app/services/genRewardService');
var dataApi = require('../../app/libs/dataApi');

suite('测试genRewardService', function () {
    suite('generateReward', function () {
        test('生成奖励', function () {
            var check_month = parseInt(moment().format('M'));
            var check_conf = dataApi.check.findById(check_month);
            _.some(check_conf, function (check_conf) {
                if (check_conf.day == 1) {
                    genRewardService.generateReward(check_conf);
                }
            });
        });
    });
});
